/* Global Styles */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-page-background {
    background-image: url('/images/background.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.responsive-height {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    flex: 1;
}

@media (max-width: 767px) {
    .responsive-height {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* Card Styles */
.card {
    border-radius: 2rem;
    border: 4px solid #ffd700 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: #ffffff;
    overflow: hidden;
}

.card-badge {
    border-radius: 0 0 0 1rem;
    padding: 0.5rem 1rem;
    font-weight: bold;
}

.card-header {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem 0.5rem;
}

.card-header img {
    max-width: 120px;
    height: auto;
}

.card-body {
    padding: 0.75rem 2rem 1rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid #e0e0e0;
    padding: 0.75rem;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 1.5rem;
    border: 2px solid #e0e0e0;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b4cb8;
    box-shadow: 0 0 0 0.2rem rgba(59, 76, 184, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #bbb;
    font-size: 0.9rem;
}

/* Password Input Styles */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 3rem;
}

.password-input button {
    position: absolute;
    right: 1rem;
    top: 20%;
    transform: translateY(-20%);
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 10;
}

.password-input button svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #6c757d;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    border-radius: 1.5rem;
    color: #2d3e9f;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #ffed4e 0%, #ffd700 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    color: #2d3e9f;
}

.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    color: #2d3e9f;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.3);
}

/* Link Styles */
a {
    color: #3b4cb8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: #2d3e9f;
    font-weight: 600;
}

.card-footer a {
    color: #2d3e9f;
}

.card-footer a:hover {
    color: #3b4cb8;
}

/* Text Styles */
.text-muted {
    color: #6c757d !important;
    font-size: 0.85rem;
}

.card .text-muted {
    font-size: 0.8rem;
}

/* Footer Styles */
.auth-page-background .footer {
    padding: 0.5rem 0;
    margin-top: auto;
    width: 100%;
}

.footer .text-white {
    color: #ffffff !important;
    font-size: 0.8rem;
}

.footer a {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.footer a:hover {
    color: #ffd700 !important;
    text-decoration: underline;
}

/* Captcha Styles */
.h-captcha {
    display: inline-block;
}

/* Error Message Styles */
.invalid-feedback,
.text-danger {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Valid State */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #28a745;
    background-image: none;
}

.was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

/* Invalid State */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Password Strength Meter */
.password-strength-meter {
    margin-top: 0.25rem;
}

.password-strength-meter .progress {
    height: 0.4rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Login Page Specific Styles */
.card .row.g-0 {
    margin: 0;
}

.card .row.g-0 > div {
    padding: 1.5rem 1.25rem;
}

/* Login Left Side */
.card .col-md-6:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Login Right Side */
.card .col-md-6:last-child {
    border-left: 1px solid #e0e0e0;
}

/* Login Welcome Text */
.card h2.fw-bold {
    color: #2d3e9f;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card h4.fw-bold {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2d3e9f;
    font-size: 1rem;
}

/* Login Form Input */
.position-relative .fa-solid {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #6c757d;
    z-index: 10;
}

.position-relative input.ps-5 {
    padding-left: 3.5rem !important;
}

/* Login Form Controls */
.form-control-lg {
    border: 2px solid #e8e8e8;
    border-radius: 1.5rem;
    padding: 0.5rem 0.9rem;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 0.9rem;
}

.form-control-lg:focus {
    background-color: #fff;
    border-color: #3b4cb8;
    box-shadow: 0 0 0 0.2rem rgba(59, 76, 184, 0.15);
}

.form-control-lg::placeholder {
    color: #999;
}

/* Checkbox Styles */
.form-check-input {
    border: 2px solid #c0c0c0;
    border-radius: 0.25rem;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #2d3e9f;
    border-color: #2d3e9f;
}

.form-check-label {
    color: #2d3e9f;
    font-size: 0.85rem;
    cursor: pointer;
}

.was-validated .form-check-input:valid ~ .form-check-label,
.form-check-input.is-valid ~ .form-check-label {
    color: #28a745;
}

.was-validated .form-check-input:invalid ~ .form-check-label,
.form-check-input.is-invalid ~ .form-check-label {
    color: #dc3545;
}

/* Login Links */
.card a.text-decoration-none {
    color: #2d3e9f;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.card a.text-decoration-none:hover {
    color: #3b4cb8;
    font-weight: 600;
}

/* Sign Up Link */
.card .text-center span {
    color: #2d3e9f;
    font-size: 0.95rem;
}

.card .text-center a.fw-semibold {
    color: #2d3e9f;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Illustration Image */
.card img[alt='Illustration'] {
    max-width: 280px;
    margin-bottom: 1.5rem;
}

.card img[alt='Logo'] {
    max-width: 200px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem 2rem;
    }

    .btn-primary {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    /* Login Page Mobile Adjustments */
    .card .row.g-0 > div {
        padding: 2rem 1.5rem;
    }

    .card .col-md-6:last-child {
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .card img[alt='Illustration'] {
        max-width: 200px;
    }

    .card img[alt='Logo'] {
        max-width: 150px;
    }

    .card h2.fw-bold {
        font-size: 1.5rem;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1.5rem 1.25rem;
    }

    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.65rem 1rem;
    }

    .card-header img {
        max-width: 250px;
    }
}